Building a project's targets

This section only applies if you use SNiFF+'s Make Support. If you use your own Makefiles, please refer to Using Your Own Makefiles.

| Note
| By default, debugging information is generated for targets compiled in SNiFF+. To turn off this default behavior, please refer to Specifying platform-specific Make information.

You can build targets in the Project Editor, the Source Editor and the Shell. Here, the Project Editor is used. To build the project's targets:

Open the project whose target(s) you want to build.
Update Make Support Files:

- Choose the Update Makefiles... command from the Target menu.
- Press the OK button in the dialog that appears to update the project's dependencies information.
  SNiFF+ generates or updates the Make Support Files of all projects checkmarked in the Project Tree.

If you work in a PWE that accesses an SOWE, choose the Make > symbolic_links command from the Target menu.
SNiFF+ creates symbolic links in your PWE to object files and targets in the SOWE (for details, please refer to Sharing object files).
In the Project Tree, select the project whose target(s) you want to build.
Choose the appropriate Make command from the Target menu:

- To build the default target of the project, choose the Make default target command.
- To recursively build the default target of the project and each of its subprojects, choose the Make all command.

Results
You should see the following results, depending on which command you executed.

- For both commands:
When your Make utility is called in a project directory, it checks the project's default target against its dependencies. Any dependencies that need recompiling are recompiled, and the default target is then built.
- If you chose the Make default target command:
SNiFF+ opens a Shell tool and executes the project's Make command on the command line.
- If you chose the Make all command:
SNiFF+ opens a Shell tool and executes

make all on the command line.
SNiFF+'s General Makefile defines rules for building the all target. Basically, SNiFF+ recursively executes the Make default target command in the project directory and each subproject directory listed in the Recursive Make Dirs field of the project's Make attributes. To see an example of how this works, please refer to Building targets recursively.
Trouble Shooting
The following trouble shooting tips may come in handy:

- If the Make Target command is disabled:
You have forgotten to enter the name of the project's default target while setting up Make Support. For details, please refer to Setting up Make Support.
- Your Make utility outputs an error message similar to the following:

$SNIFF_DIR/make_support/.mk no such file or directory
where $SNIFF_DIR is your sniff installation directory.
The PLATFORM environment variable is not set. Set this variable to the value returned by the sniff_arch program, restart SNiFF+ and try again. Here's an example of how you would set the variable in the C-shell:
setenv PLATFORM `sniff_arch`